package com.ts.api.module.match.market.internal.executor.model;

import com.ts.api.module.channel.entity.ChannelRequest;
import com.ts.api.module.channel.entity.po.ChannelMarketPO;
import lombok.Data;

/**
 *  贷超联登执行器对象
 *
 *  @author Pan
 */
@Data
public class MarketExecuteFederate {

    /** 用户id */
    private Long userId;
    /** 渠道贷超实体 */
    private ChannelMarketPO channelMarket;
    /** 渠道请求上下文对象 */
    private ChannelRequest channelRequest;

    /**
     *  构建
     *  @param  channelRequest   渠道请求上下文
     *  @param  channelMarket    渠道贷超实体
     *  @param  userId           用户id
     *  @return MarketExecuteFederate
     */
    public static MarketExecuteFederate of(ChannelRequest channelRequest, ChannelMarketPO channelMarket, Long userId) {
        MarketExecuteFederate federate = new MarketExecuteFederate();
        federate.setChannelRequest(channelRequest);
        federate.setChannelMarket(channelMarket);
        federate.setUserId(userId);
        return federate;
    }
}
